import axios from '@/api/fetch';
//import * as types from './types';
import SERVER from '@/api/server';
//字典
export const getPartType = (params) => axios.get(`${SERVER.CLAIMFAC}/const/getBaseDataByType`, {params});

//省份
export const getProvinceList = (params) => axios.get(`${SERVER.CLAIMFAC}/const/getProvinceList`, {params});

//城市
export const getCityList = (params) => axios.get(`${SERVER.CLAIMFAC}/const/getCityList`, {params});

//旧件仓库下拉列表
export const getListByExample = (params) => axios.post(`${SERVER.CLAIMDEALER}/rPReturnWh/getListByExample`, {
  whStatus: 1
});

//旧件仓库下拉列表
export const getByPermissionCtrl = (params) => axios.get(`${SERVER.CLAIMDEALER}/rPReturnWh/getByPermissionCtrl`, { params });

//旧件仓库下拉列表带条件查询
export const getListByExampleWhere = (params) => axios.post(`${SERVER.CLAIMDEALER}/rPReturnWh/getListByExample`, {
  params
});

// //旧件仓库下拉列表
// export const getListByExample = (params) => axios.post(`${SERVER.CLAIMDEALER}/rPReturnWh/getListByExample`, {
//   whStatus: 1
// });

//主损件配件列表
export const getPartList = params =>
  axios.get(`${SERVER.CLAIMFAC}/const/getPartList`, {
    params
  });

//获取车型基础数据
export const getModelList = params =>
  axios.post(`${SERVER.CLAIMFAC}/baseData/getModelList`, params);

//获取vin基础数据

export const getVinList = params => axios.post(`${SERVER.RETAIL}/vehicle/listRecordClaimGroup`, params);
// 查询车辆选择框
export const searchVehicle = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/order/repair/searchVehicleSelect`, { params });
export const getDealerList = params => axios.post(`${SERVER.CMSCLOUD_CHANNEL}/message/dealerAttach/message/dealerAttach/service`,  params );
// 登陆人员职位获取职责
export const getPositionByUserOrgId = userOrgId => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/basedata/users/getPositionByUserOrgId?userOrgId=${userOrgId}` );
// 获取经销商-审核页面获取下属经销商
export const getDealerAttachListByUser = params => axios.post(`${SERVER.CMSCLOUD_CHANNEL}/message/dealerAttach/dealerInfo/allDealerInfoDetailCheck`,  params );

// 获取经销商
export const getDealerAttachList = params => axios.post(`${SERVER.CMSCLOUD_CHANNEL}/message/dealerAttach/dealerInfo/allDealerInfoDetailSP`,  params );
// 获取供应商商
export const getSupplierList = (params) => axios.get(`${SERVER.CMSCLOUD_WMS}/part/partinfo/getPartSupplier`, {params});
// 获取责任商
export const getResponsibleList = (params) => axios.get(`${SERVER.CLAIMDEALER}/rPPreAuth/getResponsible`, {params});

// 故障现象查询(参数需要 faStatus ： 1   启用状态)
export const getFailurePhenomenonListByPage = params => axios.post(`${SERVER.CLAIMFAC}/rPFaultAppear/getListByPage`,  params );

// 现场处理人：
export const getDealPersonList = params => axios.get(`${SERVER.CLAIMFAC}/const/getDealPersonList`, { params });

// 获取附加项列表
export const queryRoAddItemForClaim = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/order/repairOrder/queryRoAddItemForClaim`, { params });

// 获取自费配件
export const findRepairOrderClaim = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/ttRepairOrder/findRepairOrderClaim`, { params });

// 获取配件
export const findPartClaim = params => axios.get(`${SERVER.CMSCLOUD_WMS}/part/partinfo`, { params });

// 获取维修项目
export const selectAllRepairItemDealerForClaim = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/repairProject/selectAllRepairItemDealerForClaim`, { params });

// 获取批量活动
export const getTtRpMaList = params => axios.get(`${SERVER.CLAIMDEALER}/rPCmsClaim/getTtRpMaList`, { params });

// 获取发票
export const BasicParametersAfterSales = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/basedata/BasicParametersAfterSales`, { params });

// 获取工单
export const queryBalanceOrderForClaim = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/order/repairOrder/queryBalanceOrderForClaim`, { params });

// 预授权 索赔 获取工单
export const queryRepairOrderForClaim = params => axios.get(`${SERVER.CLAIMDEALER}/basedata/repairHistory/getAllRepairMaintain`, { params });

// 索赔 获取PDI检查单
export const queryPDIForClaim = params => axios.get(`${SERVER.CLAIMDEALER}/basedata/repairHistory/getAllPdiMaintain`, { params });
// 索赔 获取回访记录
export const queryClaimVisit = params => axios.post(`${SERVER.CLAIMFAC}/rPCmsClaim/getClaimVisitByPage`,  params);

//获取工厂
export const getListRecord= params => axios.post(`${SERVER.WHOLESALES}/tmVsFactory/listRecord`, params);

//获取留车列表
export const getSceneExamine= params => axios.get(`${SERVER.CMSCLOUD_WMS}/customerService/sceneExamine`, { params });

// 获取工单全网
export const queryRepairOrderDetailForClaimWholeNetwork = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/order/repairOrder/queryRepairOrderDetailForClaimWholeNetwork`, { params });

//获取配件类型
export const getPart = params => axios.post(`${SERVER.CLAIMFAC}/rpCmsAccessoriesType/selectByIdList`,  params );

//获取索赔类型
export const getClaim = params => axios.post(`${SERVER.CLAIMFAC}/rpCmsClaimType/selectByIdList`,  params );

//获取车系下拉
export const getModelsdictt = params => axios.get(`${SERVER.CLAIMFAC}/rPCommonPt/queryModelSelect`, {params});
